# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
#  helper :all # include all helpers, all the time

  include  AuthenticatedSystem

  around_filter :set_language

  private
  def set_language
    lang = session[:language] || :zh
    Gibberish.use_language(lang) { yield }
  end
end
